# 基础镜像
FROM  openjdk:8-jre
# author
MAINTAINER enfi

#设置时区
RUN ln -sf /usr/share/zoneinfo/Asia/Shanghai /etc/localtime
RUN echo 'Asia/Shanghai' >/etc/timezone

# 挂载目录
VOLUME /home/enfi
# 创建目录
RUN mkdir -p /home/enfi
# 指定路径
WORKDIR /home/enfi
# 复制jar文件到路径
COPY ./target/*.jar /home/enfi/app.jar
# 启动认证服务
ARG CONFIG_LOCATION
ENV CONFIG_LOCATION=${CONFIG_LOCATION}
CMD java -jar app.jar $CONFIG_LOCATION

#暴露端口
EXPOSE 8080

